import os
import copy

BIN_DIR=os.environ['BIN_DIR'];
LIB_DIR=os.environ['LIB_DIR'];

sources= [
  "jerry-all-in.c"
]

env=DefaultEnvironment().Clone()

env['CCFLAGS'] = env['CCFLAGS'] + ' -DJERRY_ES2015=0 -DCONFIG_MEM_HEAP_AREA_SIZE=2097152 -DJERRY_CPOINTER_32_BIT -DJERRY_ENABLE_ERROR_MESSAGES -DJERRY_ENABLE_LOGGING ';

if 'WITH_JS' in os.environ:
  env.Library(os.path.join(LIB_DIR, 'jerryscript'), sources)
  sources= Glob('jerrycli/*.c') 
  env.Program(os.path.join(BIN_DIR, 'jerry'), sources)
